package com.chzc.fm.duotin.bean.channel;

import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;

import java.io.Serializable;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by Administrator on 2016/6/27.
 */
public class Topic implements Serializable {

    /**
     * id : 37
     * title : 这8本书承包了你的青春
     * describe : 谁的青春不放肆，谁的青春不迷茫。春夏之交，又到了回忆季节，就让我们打开耳朵，再听一次，那年青春。
     * image_url : http://c3.duotin.com/i1/DT/dpWnGL1j1u3dviCeu1rFUt6bsYgMINgr1lmuKEM8L5Q
     * album_id : 0
     * concern_num : 0
     * album_num : 8
     * comment_num : 0
     * is_advertisement : 0
     * exposure_url :
     * click_url :
     */

    private int id;
    private String title;
    private String describe;
    private String image_url;
    private int album_id;
    private int concern_num;
    private int album_num;
    private int comment_num;
    private int is_advertisement;
    private String exposure_url;
    private String click_url;
    private int content_num;

    public static Topic objectFromData(String str) {

        return new Gson().fromJson(str, Topic.class);
    }

    public static List<Topic> arrayTopicFromData(String str) {

        Type listType = new TypeToken<ArrayList<Topic>>() {
        }.getType();

        return new Gson().fromJson(str, listType);
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getDescribe() {
        return describe;
    }

    public void setDescribe(String describe) {
        this.describe = describe;
    }

    public String getImage_url() {
        return image_url;
    }

    public void setImage_url(String image_url) {
        this.image_url = image_url;
    }

    public int getAlbum_id() {
        return album_id;
    }

    public void setAlbum_id(int album_id) {
        this.album_id = album_id;
    }

    public int getConcern_num() {
        return concern_num;
    }

    public void setConcern_num(int concern_num) {
        this.concern_num = concern_num;
    }

    public int getAlbum_num() {
        return album_num;
    }

    public void setAlbum_num(int album_num) {
        this.album_num = album_num;
    }

    public int getComment_num() {
        return comment_num;
    }

    public void setComment_num(int comment_num) {
        this.comment_num = comment_num;
    }

    public int getIs_advertisement() {
        return is_advertisement;
    }

    public void setIs_advertisement(int is_advertisement) {
        this.is_advertisement = is_advertisement;
    }

    public String getExposure_url() {
        return exposure_url;
    }

    public void setExposure_url(String exposure_url) {
        this.exposure_url = exposure_url;
    }

    public String getClick_url() {
        return click_url;
    }

    public void setClick_url(String click_url) {
        this.click_url = click_url;
    }

    public int getContent_num() {
        return content_num;
    }

    public void setContent_num(int content_num) {
        this.content_num = content_num;
    }
}
